/**
 * EsxdmSysConfig 数据接口请求封装类
 */
class EsxdmSysConfigApi {
    /**
     * 接口地址配置
     */
    static UrlCfg = {
        list: '/api/admin/esxdm-sys-config/list',
        read: '/api/admin/esxdm-sys-config/read',
        save: '/api/admin/esxdm-sys-config/save',
        copy: '/api/admin/esxdm-sys-config/copy',
        delete: '/api/admin/esxdm-sys-config/delete',
        settings: '/api/admin/esxdm-sys-config/settings',
        updateSettings: '/api/admin/esxdm-sys-config/update-settings',
    }
    /**
     * 返回一条数据
     */
    static getData(id) {
        return axios({
            url: UrlCfg.read,
            method: 'POST',
            data: { id: id }
        })
    }
    /**
     * 返回列表数据
     */
    static getList(param) {
        return axios({
            url: UrlCfg.list,
            method: 'POST',
            data: param
        })
    }
    /**
     * 保存数据
     */
    static saveData(formData) {
        return axios({
            url: UrlCfg.save,
            method: 'POST',
            data: formData
        })
    }
    /**
     * 复制数据
     */
    static copyData(formData) {
        return axios({
            url: UrlCfg.copy,
            method: 'GET',
            data: formData
        })
    }
    /**
     * 删除数据
     */
    static deleteData(id) {
        return axios({
            url: UrlCfg.delete,
            method: 'DELETE',
            data: { id: id }
        })
    }
    /**
     * 返回配置数据
     */
    static getSettings(param) {
        return axios({
            url: UrlCfg.settings,
            method: 'POST',
            data: param
        })
    }
    /**
     * 保存配置数据
     */
    static updateSettings(formData) {
        return axios({
            url: UrlCfg.updateSettings,
            method: 'POST',
            data: formData
        })
    }
}

export default EsxdmSysConfigApi;